]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: use System.gc() instead of shell_global_gc()
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 12 Jul 2012 23:59:52 +0000 (19:59 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Fri, 13 Jul 2012 00:11:38 +0000 (20:11 -0400)
gjs now offers a gc() method in the System module, no need to use our
own.

https://bugzilla.gnome.org/show_bug.cgi?id=679832

js/perf/core.js
js/ui/lookingGlass.js

index 6b3b2747510d0cdaf1ea9f27b73a2df490b66cbb..cc41c58671ed248c45bd7656306e8f81bd707a80 100644 (file)
@@ -1,5 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
+const System = imports.system;
+
 const Main = imports.ui.main;
 const Scripting = imports.ui.scripting;
 
@@ -99,7 +101,7 @@ function run() {
         Main.overview.hide();
         yield Scripting.waitLeisure();
 
-        global.gc();
+        System.gc();
         yield Scripting.sleep(1000);
         Scripting.collectStatistics();
         Scripting.scriptEvent('afterShowHide');
index df994f117dceec42a7e7e4a94aad99749085bd9a..3e6a086f718eb7ad6e5dc96c978f0d05e6755f1e 100644 (file)
@@ -12,6 +12,7 @@ const Shell = imports.gi.Shell;
 const Signals = imports.signals;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
+const System = imports.system;
 
 const History = imports.misc.history;
 const ExtensionSystem = imports.ui.extensionSystem;
@@ -665,7 +666,7 @@ const Memory = new Lang.Class({
 
         this._gcbutton = new St.Button({ label: 'Full GC',
                                          style_class: 'lg-obj-inspector-button' });
-        this._gcbutton.connect('clicked', Lang.bind(this, function () { global.gc(); this._renderText(); }));
+        this._gcbutton.connect('clicked', Lang.bind(this, function () { System.gc(); this._renderText(); }));
         this.actor.add(this._gcbutton, { x_align: St.Align.START,
                                          x_fill: false });